package com.lg.atp.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lg.atp.dao.MenuDao;
import com.lg.atp.entity.TblMenuButtonInfo;
import com.lg.atp.service.IMenuService;


@Service("iMenuService")
public class MenuServiceImpl implements IMenuService{

	@Autowired
	private MenuDao menuDao;
	
	@Override
	public List<TblMenuButtonInfo> getUserMenu(Long userId) {
		return menuDao.getUserMenu(userId);
	}

	@Override
	public TblMenuButtonInfo selectMenuById(Long id) {
		return menuDao.selectMenuById(id);
	}

	@Override
	public List<TblMenuButtonInfo> selectMenuByParentId(Long id) {
		return menuDao.selectMenuByParentId(id);
	}

	@Override
	public void insertMenu(TblMenuButtonInfo menu) {
		menuDao.insertMenu(menu);
	}

	@Override
	public void updateMenu(TblMenuButtonInfo menu) {

		menuDao.updateMenu(menu);
	}

	@Override
	public List<TblMenuButtonInfo> getMenusWithRole() {
		return menuDao.getMenusWithRole();
	}

	@Override
	public List<TblMenuButtonInfo> getAllMenu() {
		return menuDao.getAllMenu();
	}

}
